<html>
<head><meta charset="utf-8"><title>safe_arch-0.3 available to check out · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html">safe_arch-0.3 available to check out</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="197621375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197621375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197621375">(May 14 2020 at 21:35)</a>:</h4>
<p>The <a href="https://docs.rs/safe_arch/0.3.0/safe_arch/">safe_arch</a> crate is now at 0.3 and is ready for a good "kick the tires" test run.</p>
<p>Supported:</p>
<ul>
<li>all the 128-bit SIMD</li>
<li>AVX but not AVX2</li>
<li>Many of the non-SIMD CPU special ops.</li>
</ul>



<a name="197621536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197621536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197621536">(May 14 2020 at 21:36)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> Just to make sure, the bit saying "Intel (x86 / x86_64) " is actually false, right? It supports AMD I assume as well?</p>



<a name="197621590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197621590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197621590">(May 14 2020 at 21:37)</a>:</h4>
<p>oh yeah, i always forget about AMD being a thing XD.</p>
<p>Yes it's all x86 / x86_64</p>



<a name="197621751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197621751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197621751">(May 14 2020 at 21:39)</a>:</h4>
<p>Docs are fixed in <code>0.3.1</code> ;3</p>



<a name="197627311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197627311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197627311">(May 14 2020 at 22:39)</a>:</h4>
<p>Technically, VIA is still a thing too, as are some other x86 vendors, they're just uncommon. You might consider "x86 and x86-64 (Intel, AMD, etc)".</p>



<a name="197627320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197627320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197627320">(May 14 2020 at 22:39)</a>:</h4>
<p>&lt;/nit&gt;</p>



<a name="197627443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197627443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197627443">(May 14 2020 at 22:40)</a>:</h4>
<p>Also, a request for the documentation:</p>



<a name="197627493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197627493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197627493">(May 14 2020 at 22:41)</a>:</h4>
<p>For the benefit of people who <em>do</em> know the instruction they want, and don't know the name of the corresponding function, would you consider systematically including the instruction mnemonic in the documentation?</p>



<a name="197627624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197627624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197627624">(May 14 2020 at 22:42)</a>:</h4>
<p>That way, people can find it by searching.</p>



<a name="197627744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197627744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197627744">(May 14 2020 at 22:44)</a>:</h4>
<p>And, if they need to know the precise instruction semantics, they can also more easily look up the instruction in the SDM.</p>



<a name="197627922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197627922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197627922">(May 14 2020 at 22:46)</a>:</h4>
<p>Also, in the phrase "Compliment Flag", I think you wanted "complement"? But also, that isn't the name of a flag on x86. I think you mean "carry flag".</p>



<a name="197627952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197627952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197627952">(May 14 2020 at 22:47)</a>:</h4>
<p><a href="https://docs.rs/safe_arch/0.3.1/safe_arch/fn.test_mixed_ones_and_zeroes_m128i.html">https://docs.rs/safe_arch/0.3.1/safe_arch/fn.test_mixed_ones_and_zeroes_m128i.html</a> is one place I saw that, and the corresponding instruction, <code>ptest</code>, uses the carry flag.</p>



<a name="197629018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629018">(May 14 2020 at 22:59)</a>:</h4>
<p>ah, good catch, yeah i meant carry</p>



<a name="197629158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629158">(May 14 2020 at 23:00)</a>:</h4>
<p>and yeah putting instruction name into the docs so that a search shows it would be good. so far ive only been using actual searches in the files via my editor, which works accurately, but rustdoc doesn't search source of course.</p>



<a name="197629200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629200">(May 14 2020 at 23:00)</a>:</h4>
<p>The instructions aren't necessarily in the sources, either, as far as I can tell.</p>



<a name="197629236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629236">(May 14 2020 at 23:01)</a>:</h4>
<p><code>test_mixed_ones_and_zeroes_m128i</code>calls <code>_mm_test_mix_ones_zeros</code> (a name which might also want to be in the docs), but doesn't mention the underlying <code>ptest</code> instruction.</p>



<a name="197629240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629240">(May 14 2020 at 23:01)</a>:</h4>
<p>ahhh... did you mean you want the <em>assembly</em> as well as the intrinsic name?</p>



<a name="197629262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629262">(May 14 2020 at 23:01)</a>:</h4>
<p>okay, right, can probably do that over time.</p>



<a name="197629269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629269">(May 14 2020 at 23:01)</a>:</h4>
<p>Yeah, I meant the instruction mnemonic. The intrinsic name would be useful, but I was originally thinking of the instruction mnemonic. :)</p>



<a name="197629868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629868">(May 14 2020 at 23:08)</a>:</h4>
<p>For the intrinsic name and assembly op i opened a new issue here, <a href="https://github.com/Lokathor/safe_arch/issues/49">https://github.com/Lokathor/safe_arch/issues/49</a>, but that particular thing will probably be a slow, slow task. I'll probably experiment with it some as I put in the new avx2 things and then go back and revise previous entries later.</p>



<a name="197629871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629871">(May 14 2020 at 23:08)</a>:</h4>
<p>I appreciate it, thank you. Would have helped me track down the flag that that instruction actually used. :)</p>



<a name="197629886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629886">(May 14 2020 at 23:08)</a>:</h4>
<p>This is something I <em>hope</em> you'd be able to partially automate.</p>



<a name="197629932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197629932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197629932">(May 14 2020 at 23:09)</a>:</h4>
<p>Intrinsic name, yes, assembly instruction, probably not easily.</p>
<p>At least right now the crate is 0% automated.</p>



<a name="197630065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630065">(May 14 2020 at 23:11)</a>:</h4>
<p>The data at <a href="https://software.intel.com/sites/landingpage/IntrinsicsGuide/">https://software.intel.com/sites/landingpage/IntrinsicsGuide/</a> includes the names of the underlying instructions.</p>



<a name="197630153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630153">(May 14 2020 at 23:12)</a>:</h4>
<p>Right, that's what i've been using so far, but I don't have an easy way to scrape the page to associate an intrinsic name with an assembly op.</p>



<a name="197630187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630187">(May 14 2020 at 23:13)</a>:</h4>
<p>The raw data is around <em>somewhere</em>...</p>



<a name="197630290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630290">(May 14 2020 at 23:14)</a>:</h4>
<p><a href="https://software.intel.com/sites/landingpage/IntrinsicsGuide/files/data-3.5.0.xml">https://software.intel.com/sites/landingpage/IntrinsicsGuide/files/data-3.5.0.xml</a></p>



<a name="197630350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630350">(May 14 2020 at 23:15)</a>:</h4>
<p>Example:</p>
<div class="codehilite"><pre><span></span><code><span class="nt">&lt;intrinsic</span> <span class="na">tech=</span><span class="s">&quot;SSE4.1&quot;</span> <span class="na">vexEq=</span><span class="s">&quot;TRUE&quot;</span> <span class="na">name=</span><span class="s">&quot;_mm_test_mix_ones_zeros&quot;</span><span class="nt">&gt;</span>
        <span class="nt">&lt;type&gt;</span>Integer<span class="nt">&lt;/type&gt;</span>
        <span class="nt">&lt;type&gt;</span>Flag<span class="nt">&lt;/type&gt;</span>
        <span class="nt">&lt;CPUID&gt;</span>SSE4.1<span class="nt">&lt;/CPUID&gt;</span>
        <span class="nt">&lt;category&gt;</span>Logical<span class="nt">&lt;/category&gt;</span>
        <span class="nt">&lt;return</span> <span class="na">type=</span><span class="s">&quot;int&quot;</span> <span class="na">varname=</span><span class="s">&quot;dst&quot;</span> <span class="na">etype=</span><span class="s">&quot;UI32&quot;</span><span class="nt">/&gt;</span>
        <span class="nt">&lt;parameter</span> <span class="na">type=</span><span class="s">&quot;__m128i&quot;</span> <span class="na">varname=</span><span class="s">&quot;a&quot;</span> <span class="na">etype=</span><span class="s">&quot;M128&quot;</span><span class="nt">/&gt;</span>
        <span class="nt">&lt;parameter</span> <span class="na">type=</span><span class="s">&quot;__m128i&quot;</span> <span class="na">varname=</span><span class="s">&quot;mask&quot;</span> <span class="na">etype=</span><span class="s">&quot;M128&quot;</span><span class="nt">/&gt;</span>
        <span class="nt">&lt;description&gt;</span>Compute the bitwise AND of 128 bits (representing integer data) in &quot;a&quot; and &quot;mask&quot;, and set &quot;ZF&quot; to 1 if the result is zero, otherwise set &quot;ZF&quot; to 0. Compute the bitwise NOT of &quot;a&quot; and then AND with &quot;mask&quot;, and set &quot;CF&quot; to 1 if the result is zero, otherwise set &quot;CF&quot; to 0. Return 1 if both the &quot;ZF&quot; and &quot;CF&quot; values are zero, otherwise return 0.<span class="nt">&lt;/description&gt;</span>
        <span class="nt">&lt;operation&gt;</span>
IF ((a[127:0] AND mask[127:0]) == 0)
        ZF := 1
ELSE
        ZF := 0
FI
IF (((NOT a[127:0]) AND mask[127:0]) == 0)
        CF := 1
ELSE
        CF := 0
FI
IF (ZF == 0 <span class="ni">&amp;amp;&amp;amp;</span> CF == 0)
        dst := 1
ELSE
        dst := 0
FI
        <span class="nt">&lt;/operation&gt;</span>
        <span class="nt">&lt;instruction</span> <span class="na">name=</span><span class="s">&quot;PTEST&quot;</span> <span class="na">form=</span><span class="s">&quot;xmm, xmm&quot;</span> <span class="na">xed=</span><span class="s">&quot;PTEST_XMMdq_XMMdq&quot;</span><span class="nt">/&gt;</span>
        <span class="nt">&lt;header&gt;</span>smmintrin.h<span class="nt">&lt;/header&gt;</span>
<span class="nt">&lt;/intrinsic&gt;</span>
</code></pre></div>



<a name="197630393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630393">(May 14 2020 at 23:16)</a>:</h4>
<p>iiiiiinteresting.</p>



<a name="197630462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630462">(May 14 2020 at 23:16)</a>:</h4>
<p>Digging around, I don't see any actual <em>license</em> attached to that data, unfortunately. So the descriptions shouldn't be directly reused. But you could at least get the mapping data from that.</p>



<a name="197630603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630603">(May 14 2020 at 23:18)</a>:</h4>
<p>And you could <em>link</em> to the intrinsics guide, like the built-in intrinsics do.</p>



<a name="197630681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630681">(May 14 2020 at 23:19)</a>:</h4>
<p>Hope that helps. :)</p>



<a name="197630734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630734">(May 14 2020 at 23:19)</a>:</h4>
<p>Yeah, I mean in general their descriptions of the operations range between "okay" and "what the heck?", but being able to easily check the assembly helps.</p>



<a name="197630807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630807">(May 14 2020 at 23:20)</a>:</h4>
<p>Yeah, these are operational descriptions, which don't necessarily make good documentation. :)</p>



<a name="197630995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197630995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197630995">(May 14 2020 at 23:23)</a>:</h4>
<p>But the data would help you check the assembly instruction, as well as confirming the types and making sure they correspond to your naming scheme (because this kind of thing is <em>really</em> prone to copy-paste issues).</p>



<a name="197631098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197631098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197631098">(May 14 2020 at 23:24)</a>:</h4>
<p>tiny copy-paste bugs are knows as "doing a loka" in some parts of the Rust Discord universe.</p>



<a name="197631121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197631121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197631121">(May 14 2020 at 23:24)</a>:</h4>
<p>My sympathies.</p>



<a name="197631452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197631452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197631452">(May 14 2020 at 23:29)</a>:</h4>
<p>A few other bits of feedback:</p>



<a name="197631475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197631475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197631475">(May 14 2020 at 23:30)</a>:</h4>
<p>The general term <code>blend</code> should be defined along with the other verbs you have a glossary for (and thank you for that glossary!).</p>



<a name="197631764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197631764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197631764">(May 14 2020 at 23:33)</a>:</h4>
<p>The explicit <code>shift_left</code> and <code>shift_right</code> seem rather verbose; even Rust's own traits abbreviate those as <code>shl</code> and <code>shr</code>. I think as long as you have them both mentioned in the glossary, and keep them separated from other words in the name with <code>_</code>, they'll be quite readable to people. And avoiding that bit of verbosity seems likely to substantially help with over-wide lines that can themselves reduce readability.</p>



<a name="197631848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197631848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197631848">(May 14 2020 at 23:34)</a>:</h4>
<p>Defining <code>permute</code> and <code>shuffle</code> (and contrasting the differences) would help.</p>



<a name="197632030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632030">(May 14 2020 at 23:37)</a>:</h4>
<p>yeah, shl and shr are probably better names. In 0.2 the names were even longer actually, because they also had "immediate" in there. The lib has enough macros at this point that people will probably end up coming to grips with "macro means there's an immediate involved" on their own, though i'd like to make that clearer probably. Some of the early macros said "this is a macro because it needs to be a compile time const" but the most recent macros started to shift away from that.</p>



<a name="197632289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632289">(May 14 2020 at 23:41)</a>:</h4>
<p>Also, a typo:</p>
<div class="codehilite"><pre><span></span><code>convert_i16_lower2_to_i64_m128i

Convert the lower two i16 lanes to two i32 lanes.
</code></pre></div>



<a name="197632295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632295">(May 14 2020 at 23:41)</a>:</h4>
<p>That should be <code>two i64 lanes</code>, right?</p>



<a name="197632452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632452">(May 14 2020 at 23:43)</a>:</h4>
<p>ah, yes, doc text falls to copy-paste bugs the most because <code>cargo test</code> sadly doesn't (yet?) check your words themselves.</p>



<a name="197632536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632536">(May 14 2020 at 23:44)</a>:</h4>
<p>:)</p>



<a name="197632581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632581">(May 14 2020 at 23:44)</a>:</h4>
<p>There's one thing you could probably check: if the summary line of your docs mention a type that the function name doesn't (counting the implicit things like <code>m128d</code> implying two <code>f64</code> values).</p>



<a name="197632725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632725">(May 14 2020 at 23:46)</a>:</h4>
<p>One future plan is to re-review every single function in <em>random</em> order (a few at a time) so that (hopefully) each individual function has to fully stand on its own without the brain just assuming the context from the previous similar function.</p>



<a name="197632747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632747">(May 14 2020 at 23:46)</a>:</h4>
<p>That might help. That's roughly how I caught this.</p>



<a name="197632764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632764">(May 14 2020 at 23:47)</a>:</h4>
<p>(Also, as an aside, the whole <code>lower2</code> and <code>lower4</code> naming is a <em>great</em> clarification.)</p>



<a name="197632910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197632910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197632910">(May 14 2020 at 23:49)</a>:</h4>
<p>Regarding <a href="https://github.com/Lokathor/safe_arch/commit/24f28a9aa43493ec982967a7222fb0eaacf02d48">https://github.com/Lokathor/safe_arch/commit/24f28a9aa43493ec982967a7222fb0eaacf02d48</a> , please don't link directly to the versioned XML; that's versioned, and there may be a newer version. If you're going to link to the versioned XML file, please at least include a note that there may be a newer version, and put in your release procedure to check for a newer version. :)</p>



<a name="197633001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197633001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197633001">(May 14 2020 at 23:50)</a>:</h4>
<p>ah, hmm, well how did you find the 3.5 version?</p>



<a name="197633014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197633014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197633014">(May 14 2020 at 23:50)</a>:</h4>
<p>Browser console. :/</p>



<a name="197633025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197633025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197633025">(May 14 2020 at 23:51)</a>:</h4>
<p><a href="https://software.intel.com/sites/landingpage/IntrinsicsGuide/files/ReleaseNotes.html">https://software.intel.com/sites/landingpage/IntrinsicsGuide/files/ReleaseNotes.html</a> will tell you the current version number, though.</p>



<a name="197633041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197633041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197633041">(May 14 2020 at 23:51)</a>:</h4>
<p>And you can edit the URL accordingly.</p>



<a name="197633159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197633159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197633159">(May 14 2020 at 23:52)</a>:</h4>
<p>There <em>really</em> should be a "latest" URL. :(</p>



<a name="197633214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197633214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197633214">(May 14 2020 at 23:53)</a>:</h4>
<p>alright readme should be better now.</p>



<a name="197633266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197633266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197633266">(May 14 2020 at 23:54)</a>:</h4>
<p>Thank you!</p>



<a name="197633311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197633311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197633311">(May 14 2020 at 23:54)</a>:</h4>
<p>I think that the naming gets easier the more you know about every single operation available, so i have a lot of sympathy for whoever had to name some of the early sse stuff without really knowing what would eventually exist later on.</p>



<a name="197633350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/197633350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#197633350">(May 14 2020 at 23:54)</a>:</h4>
<p><a href="https://twitter.com/x86instructions">https://twitter.com/x86instructions</a></p>



<a name="201024442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/safe_arch-0.3%20available%20to%20check%20out/near/201024442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/safe_arch-0.2E3.20available.20to.20check.20out.html#201024442">(Jun 16 2020 at 14:36)</a>:</h4>
<p>0.4 published, up through avx2 now.</p>
<p>Probably will need much more docs and some breaking changes on the names to bring it all together consistently, but file issues if you see them.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>